package jdbc;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

public class Main {

    public static void main(String[] args) throws SQLException, ClassNotFoundException {
        Class.forName("com.mysql.cj.jdbc.Driver");
        String url="jdbc:mysql://101.201.150.42:3306/test?useUnicode=true&characterEncoding=utf8&useSSL=false";
        String useraccount="root";
        String password="123456";
        Connection connection = DriverManager.getConnection(url, useraccount, password);
        String sql = "insert into name (name) values ('lcq')";
        Statement statement = connection.createStatement();
        statement.execute(sql);
        connection.close();

    }
}
